SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwbIncumbencias
AS
SELECT dbo.tb_Incumbencias.idIncumbencia AS ID, dbo.vwrGruposdeIncumbencias.Descripcion AS GrupoIncumbencia, 
               dbo.vwrCargosGenericos.Descripcion AS CargoGenerico, dbo.vwrAsignaturasGenericas.Descripcion AS AsignaturaGenerica
FROM  dbo.tb_Incumbencias INNER JOIN
               dbo.vwrGruposdeIncumbencias ON dbo.tb_Incumbencias.GrupoIncumbencia = dbo.vwrGruposdeIncumbencias.id INNER JOIN
               dbo.vwrCargosGenericos ON dbo.tb_Incumbencias.CargoGenerico = dbo.vwrCargosGenericos.ID INNER JOIN
               dbo.vwrAsignaturasGenericas ON dbo.tb_Incumbencias.AsignaturaGenerica = dbo.vwrAsignaturasGenericas.ID
GO
GRANT SELECT ON  [dbo].[vwbIncumbencias] TO [Juntas]
GRANT SELECT ON  [dbo].[vwbIncumbencias] TO [SoloVer]
GO
